<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>ng-readonly与ng-disabled的区别</title>
	    <script src="../org/angular.min.js"></script>
	    <style>
	    	input[readonly]{
	    		background-color: darkgray;
	    	}
	    </style>
	</head>
	<body>
	    <div ng-app="hd" ng-controller="ctrl">
	    	<!--<form method="post" action="ngReadonly.php">
	    		<input type="text" name="a" readonly="readonly" value="aaaaa" />
	    	    <input type="text" name="b" disabled="disabled" value="bbbbb" />
	    	    <input type="submit" />
	    	</form>-->
	    	
	    	年龄：<input type="text" ng-model="user.age" />
	    	邮箱：<input type="text" ng-model="user.email" ng-readonly="user.uid" />
	    </div>
	    <script>
	    	var m = angular.module('hd',[]);
	    	m.controller('ctrl',['$scope',function($scope){
	    		 $scope.user={age:5,uid:1,email:"abcdef@123.com"}
	    	}]);
	    </script>
	</body>
</html>